﻿<html>
	<head>
		<title>ECOTree Simple Tree 1</title>
		  <link rel="stylesheet" type="text/css" href="extjs/resources/css/ext-all.css" />
		  <script type="text/javascript" src="extjs/adapter/ext/ext-base.js"></script>
		  <script type="text/javascript" src="extjs/ext-all.js"></script>
			
			<!-- Sets the basepath for the library if not in same directory -->
			<script type="text/javascript">
				mxBasePath = 'mxgraph';
			</script>
		
			<!-- Loads and initializes the library -->
			<script type="text/javascript" src="mxgraph/js/mxClient.js"></script>

		<!-- Example code -->
	<script type="text/javascript">
		// Program starts here. Creates a sample graph in the
		// DOM node with the specified ID. This function is invoked
		// from the onLoad event handler of the document (see below).
		function main(container)
		{
			// Checks if the browser is supported
			if (!mxClient.isBrowserSupported())
			{
				// Displays an error message if the browser is not supported.
				mxUtils.error('Browser is not supported!', 200, false);
			}
			else
			{
				// Enables crisp rendering of rectangles in SVG
				mxRectangleShape.prototype.crisp = true;
				
				// Creates the graph inside the given container
				var graph = new mxGraph(container);

				// Uncomment the following if you want the container
				// to fit the size of the graph
				//graph.setResizeContainer(true);
				//graph.setEnabled(false);
				// Enables rubberband selection
				new mxRubberband(graph);
				
				// Gets the default parent for inserting new cells. This
				// is normally the first child of the root (ie. layer 0).
				var parent = graph.getDefaultParent();
								
				// Adds cells to the model in a single step
				graph.getModel().beginUpdate();
				try
				{
					var prefix = 'shape=image;image=images/Blue.png;';
					var prefix1 = 'shape=image;image=images/firewall1.png;';
					var v1 = graph.insertVertex(parent, null, 'outside:192.168.3.254/32', 60, 20, 20, 20,prefix+'verticalLabelPosition=bottom;verticalAlign=top');
					var v2 = graph.insertVertex(parent, null, 'ASA2', 200, 14, 33, 33,prefix1+'verticalLabelPosition=bottom;verticalAlign=top');
					var v3 = graph.insertVertex(parent, null, 'outside:192.168.2.254/32', 208, 120, 20, 20,prefix+'verticalLabelPosition=bottom;verticalAlign=top');
					var v4 = graph.insertVertex(parent, null, '192.168.2.0/24', 200, 200, 100, 20);
					var v5 = graph.insertVertex(parent, null, '192.168.1.0/24', 220, 280, 100, 20);
					var v6 = graph.insertVertex(parent, null, 'outside:192.168.1.254/32', 300, 350, 20, 20,prefix+'verticalLabelPosition=bottom;verticalAlign=top');
					var v7 = graph.insertVertex(parent, null, 'ASA1', 390, 430, 33, 33,prefix1+'verticalLabelPosition=bottom;verticalAlign=top;fontColor=#FF0000;fontStyle=1');
					var v8 = graph.insertVertex(parent, null, 'outside:192.168.10.254/32', 450, 350, 20, 20,prefix+'verticalLabelPosition=bottom;verticalAlign=top;fontColor=#FF0000;fontStyle=1');
					var v9 = graph.insertVertex(parent, null, '192.168.10.0/24', 500, 280, 100, 20,"fontColor=#FF0000;fontStyle=1");
					var v10 = graph.insertVertex(parent, null, '10.10.1.0/24', 550, 220, 100, 20,"fontColor=#FF0000;fontStyle=1");
					var v11 = graph.insertVertex(parent, null, '10.10.2.0/24', 600, 180, 100, 20,"fontColor=#FF0000;fontStyle=1");
					var v12 = graph.insertVertex(parent, null, 'outside:10.10.2.254/32', 650, 120, 20, 20,prefix+'verticalLabelPosition=bottom;verticalAlign=top;fontColor=#FF0000;fontStyle=1');
					var v13 = graph.insertVertex(parent, null, 'ASA3', 645, 14, 33, 33,prefix1+'verticalLabelPosition=bottom;verticalAlign=top;fontColor=#FF0000;fontStyle=1');
					var v14 = graph.insertVertex(parent, null, 'outside:10.10.3.254/32', 500, 80, 20, 20,prefix+'verticalLabelPosition=bottom;verticalAlign=top;fontColor=#FF0000;fontStyle=1');

					var e1 = graph.insertEdge(parent, null, '', v1, v2,"endArrow=none;strokeWidth=2;");
					var e2 = graph.insertEdge(parent, null, '', v3, v2,"endArrow=none;strokeWidth=2;");
					var e3 = graph.insertEdge(parent, null, '', v4, v3,"endArrow=none;strokeWidth=2;");
					var e4 = graph.insertEdge(parent, null, '', v4, v5,"endArrow=none;strokeWidth=2;");
					var e5 = graph.insertEdge(parent, null, '', v5, v6,"endArrow=none;strokeWidth=2;");
					var e6 = graph.insertEdge(parent, null, '', v6, v7,"endArrow=none;strokeWidth=2;");
					var e7 = graph.insertEdge(parent, null, '', v8, v7,"endArrow=none;strokeWidth=2;strokeColor=#FF0000;");
					var e8 = graph.insertEdge(parent, null, '', v8, v9,"endArrow=none;strokeWidth=2;strokeColor=#FF0000;");
					var e9 = graph.insertEdge(parent, null, '', v10, v9,"endArrow=none;strokeWidth=2;strokeColor=#FF0000;");
					var e10 = graph.insertEdge(parent, null, '', v10, v11,"endArrow=none;strokeWidth=2;strokeColor=#FF0000;");
					var e11 = graph.insertEdge(parent, null, '', v12, v11,"endArrow=none;strokeWidth=2;strokeColor=#FF0000;");
					var e12 = graph.insertEdge(parent, null, '', v12, v13,"endArrow=none;strokeWidth=2;strokeColor=#FF0000;");
					var e13 = graph.insertEdge(parent, null, '', v14, v13,"endArrow=none;strokeWidth=2;strokeColor=#FF0000;");
				}
				finally
				{
					// Updates the display
					graph.getModel().endUpdate();
				}
			}
		};
	</script>
</head>
<!-- Page passes the container for the graph to the program -->
<body  onload="main(document.getElementById('graphContainer'))">

	<div id="graphContainer"
		style="overflow:hidden;width:730;height:500px;">
	</div>
</body>
</html>